<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path;
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>
        ${title}
    </title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="<%=basePath%>/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=basePath%>/css/font-awesome.min.css">
    <link rel="stylesheet" href="<%=basePath%>/css/ionicons.min.css">
    <link rel="stylesheet" href="<%=basePath%>/dist/css/AdminLTE.min.css">
    <link rel="stylesheet" href="<%=basePath%>/toastr/toastr.css" type="text/css"/>
    <link rel="stylesheet" href="<%=basePath%>/dist/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="<%=basePath%>/fileupload/fileinput.min.css"/>
    <link rel="stylesheet" href="<%=basePath%>/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css">
    <link rel="stylesheet" href="<%=basePath%>/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css">
    <link rel="stylesheet" href="<%=basePath%>/plugins/iCheck/all.css">
    <link rel="stylesheet" href="<%=basePath%>/pagination/style/pagination.css" media="screen">
    <link rel="stylesheet" href="<%=basePath%>/plugins/iziModal/css/iziModal.min.css">
    <link rel="stylesheet" href="<%=basePath%>/plugins/select2/select2.min.css">
    <link rel="stylesheet" href="<%=basePath%>/plugins/iCheck/all.css">
    <link rel="stylesheet" href="<%=basePath%>/plugins/loaders/loaders.css"/>
    <link rel="stylesheet" href="<%=basePath%>/plugins/flavr/animate.css"/>
    <link rel="stylesheet" href="<%=basePath%>/plugins/flavr/flavr.css"/>
    <link rel="stylesheet" href="<%=basePath%>/plugins/bootstrap-treeview/css/bootstrap-treeview.css">
    <link rel="stylesheet" href="<%=basePath%>/plugins/viewer/viewer.min.css">
    <style>
        li{
            list-style: none;
        }
    </style>
</head>
<!-- ADD THE CLASS sidedar-collapse TO HIDE THE SIDEBAR PRIOR TO LOADING THE SITE -->
<body class="hold-transition skin-blue sidebar-mini">
<div id="request-div" style="position: absolute;width: 100%;height: 100%;z-index: 10;display: none;">
    <img src='../images/request-sending.gif' style="position: relative;top: 50%;left: 50%;width: 70px;height: 70px">
</div>
<!-- Site wrapper -->
<div class="wrapper">
    <header class="main-header">
        <!-- Logo -->
        <jsp:include page="../logo.jsp" ></jsp:include >
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-fixed-top">
            <!-- Sidebar toggle button-->
            <a class="sidebar-toggle" data-toggle="offcanvas" role="button" onclick="show()">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>
            <jsp:include page="../menuTop.jsp"></jsp:include>
        </nav>
    </header>


    <input type="hidden" value="${upkeepId}" id="upkeepId">
    <input type="hidden" value="${loginUser.type}" id="userType">
    <input type="hidden" value="<%=basePath%>" id="basePath">

    <!-- Left side column. contains the sidebar -->
    <aside class="main-sidebar">
        <jsp:include page="../menu.jsp"></jsp:include>
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper" style="padding-top:50px;">
        <section class="content-header">
            <ol class="breadcrumb">
                <li class="text-muted"><i class="fa fa-th"></i>&nbsp;&nbsp;保养</li>
                <li class="text-muted"><i class="fa fa-circle-o"></i>&nbsp;&nbsp;保养详情</li>
            </ol>
        </section>
        <section class="content">
            <div class="row">
                <div class="col-md-12 right-part">
                    <div class="nav-tabs-custom">
                        <ul class="nav nav-tabs">
                            <li class="active"><a href="#repair" data-toggle="tab">保养信息</a></li>
                            <li><a href="#timeline" data-toggle="tab">重大事件</a></li>
                            <li><a href="#assign" data-toggle="tab">指派信息</a></li>
                            <li><a href="#file" data-toggle="tab">文件档案</a></li>
                            <li><a href="#part" data-toggle="tab">备件信息</a></li>
                            <li><a href="#score" data-toggle="tab">评分信息</a></li>
                        </ul>

                        <li class="tab-content" style="min-height: 600px">
                            <div class="tab-pane" id="timeline"  style="min-height: 600px">
                                <ul class="timeline timeline-inverse" id="timeAxis">
                                    <li><i class='fa fa-wrench' style='color: #fff;background:#f9b229'></i>
                                        <div class='timeline-item'>
                                            <h3 class='timeline-header' style='background: #fff'>
                                                <span style='color: #000'></span>
                                            </h3>
                                            <div class='timeline-body'>
                                                <span style='color: #5082eb'></span>
                                            </div>
                                            <div>
                                            </div>
                                        </div>
                                    </li>
                                    <li><i class='fa fa-clock-o bg-gray'></i></li>
                                </ul>
                            </div>

                            <div class="active tab-pane" id="repair">
                                <table class="table table-striped table-bordered">
                                    <tr>
                                        <td colspan="6" class="text-left col-md-12 info"><label>&nbsp;&nbsp;保养信息</label></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right"><label class="text-muted">保养申请时间</label></td>
                                        <td class="text-left"><span id="createTimeSpan"></span></td>
                                        <td class="text-right"><label class="text-muted">申请人</label></td>
                                        <td class="text-left"><span id="applicantNameSpan"></span></td>
                                        <c:if test="${loginUser.type == '1101'}">
                                            <td class="text-right">&nbsp;</td>
                                            <td class="text-left">&nbsp;</td>
                                        </c:if>
                                        <c:if test="${loginUser.type != '1101'}">
                                            <td class="text-right"><label class="text-muted">医院</label></td>
                                            <td class="text-left"><span id="hospitalNameSpan"></span></td>
                                        </c:if>
                                    </tr>
                                    <tr>
                                        <td class="text-right" ><label class="text-muted">申请人电话</label></td>
                                        <td class="text-left" ><span id="upkeepApplicantPhoneSpan"></span></td>
                                        <td class="text-right"><label class="text-muted">申请保养设备状态</label></td>
                                        <td class="text-left"><span id="deviceStatusStrSpan"></span></td>
                                        <td class="text-right" ><label class="text-muted">保养状态</label></td>
                                        <td class="text-left" ><span id="statusStrSpan"></span></td>
                                    </tr>
                                    <tr>
                                        <td colspan="6" class="text-left col-md-12 info"><label>&nbsp;&nbsp;设备信息</label></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right"><label class="text-muted">设备名称</label></td>
                                        <td class="text-left"><span id="deviceNameSpan"></span></td>
                                        <td class="text-right"><label class="text-muted">设备型号</label></td>
                                        <td class="text-left"><span id="deviceModelSpan"></span></td>
                                        <td class="text-right"><label class="text-muted">设备序列号</label></td>
                                        <td class="text-left"><span id="snSpan"></span></td>
                                    </tr>
                                    <tr>
                                        <td colspan="6" class="text-left col-md-12 info"><label>&nbsp;&nbsp;医院填写信息</label></td>
                                    </tr>
                                    <tr class="service">
                                        <td class="text-right"><label class="text-muted">服务商类型</label></td>
                                        <td class="text-left"><span id="serviceTypeNameSpan"></span></td>
                                        <td class="text-right"><label class="text-muted">服务商名称</label></td>
                                        <td class="text-left"><span id="serviceNameSpan"></span></td>
                                        <td class="text-right"><label class="text-muted">服务商联系人</label></td>
                                        <td class="text-left"><span id="serviceContactsSpan"></span></td>
                                    </tr>
                                    <tr class="service1">
                                        <td class="text-right"><label class="text-muted">服务商联系电话</label></td>
                                        <td class="text-left" colspan="5"><span id="servicePhoneSpan"></span></td>
                                    </tr>

                                    <tr>
                                        <td colspan="6" class="text-left col-md-12 info"><label>&nbsp;&nbsp;平台处理信息</label></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right"><label class="text-muted">平台处理时间</label></td>
                                        <td class="text-left"><span id="handleTimeSpan"></span></td>
                                        <td class="text-right"><label class="text-muted">平台处理人</label></td>
                                        <td class="text-left"><span id="terraceHandlePersonNameSpan"></span></td>
                                        <td class="text-right examine"><label class="text-muted">审核结果</label></td>
                                        <td class="text-left examine"><span id="examineSpan"></span></td>
                                    </tr>
                                    <tr class="examine">
                                        <td class="text-right"><label>审核说明</label></td>
                                        <td colspan="text-left" class="5"><span id="examineCommentSpan"></span></td>
                                    </tr>
                                    <tr>
                                        <td colspan="6" class="text-left col-md-12 info"><label>&nbsp;&nbsp;派工信息</label></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right" ><label class="text-muted">预计上门时间</label></td>
                                        <td class="text-left" ><span id="engineerExpectedTimeSpan"></span></td>
                                        <td class="text-right" ><label class="text-muted">医院联系人</label></td>
                                        <td class="text-left" ><span id="hospitalContactsSpan"></span></td>
                                        <td class="text-right" ><label class="text-muted">医院联系电话</label></td>
                                        <td class="text-left"><span id="hospitalPhoneSpan"></span></td>
                                    </tr>

                                    <tr class="current">
                                        <td class="text-right"><label class="text-muted">当前处理服务商</label></td>
                                        <td class="text-left"><span id="currentServiceTypeSpan"></span></td>
                                        <td class="text-right"><label class="text-muted">当前处理服务商</label></td>
                                        <td class="text-left"><span id="currentServiceNameSpan"></span></td>
                                        <td class="text-right"><label class="text-muted">服务商负责人</label></td>
                                        <td class="text-left"><span id="currentServiceContactsSpan"></span></td>
                                    </tr>
                                    <tr class="current">
                                        <td class="text-right"><label class="text-muted">负责人电话</label></td>
                                        <td class="text-left"><span id="currentServicePhoneSpan"></span></td>
                                    </tr>

                                    <tr>
                                        <td class="text-right"><label class="text-muted">保养时间</label></td>
                                        <td class="text-left"><span id="upkeepDateSpan"></span></td>
                                        <td class="text-right" ><label class="text-muted">差旅时间</label></td>
                                        <td class="text-left" ><span id="travelTimeSpan"></span></td>
                                        <td class="text-right" ><label class="text-muted">保养结束时间</label></td>
                                        <td class="text-left" ><span id="upkeepEndTimeSpan"></span></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right" ><label class="text-muted">保养内容</label></td>
                                        <td class="text-left"><span id="upkeepContentSpan"></span></td>
                                        <td class="text-right" ><label class="text-muted">保养结束设备状态</label></td>
                                        <td class="text-left" ><span id="endDeviceStatusStrSpan"></span></td>
                                        <td class="text-right" ><label class="text-muted">&nbsp;</label></td>
                                        <td class="text-left"><span ></span>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td colspan="6" class="text-left col-md-12 info"><label>&nbsp;&nbsp;确认信息</label></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right" ><label class="text-muted">确认时间</label></td>
                                        <td class="text-left" ><span id="confirmTimeSpan"></span></td>
                                        <td class="text-right" ><label class="text-muted">确认人</label></td>
                                        <td class="text-left" ><span id="confirmPersonNameSpan"></span></td>
                                        <td class="text-right" ><label class="text-muted">说明</label></td>
                                        <td class="text-left"><span id="commentSpan"></span></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right" ><label class="text-muted">备注</label></td>
                                        <td class="text-left" colspan="5"><span id="remarkSpan"></span></td>
                                    </tr>
                                </table>
                            </div>

                            <div class="tab-pane table-responsive" id="assign" style="min-height: 600px">
                                <div class="box-body table-responsive no-padding">
                                    <table class="table table-bordered ">
                                        <thead>
                                        <tr class="info">
                                            <th class="text-center text-muted">指派公司</th>
                                            <th class="text-center text-muted">指派公司类型</th>
                                            <th class="text-center text-muted">被指派公司</th>
                                            <th class="text-center text-muted">被指派公司类型</th>
                                            <th class="text-center text-muted">指派时间</th>
                                            <th class="text-center text-muted">指派工程师</th>
                                            <th class="text-center text-muted">工程师电话</th>
                                        </tr>
                                        </thead>
                                        <tbody id="assign_upkeep_list">


                                        </tbody>
                                    </table>
                                </div>
                            </div>

                            <div class="tab-pane table-responsive" id="file"
                                 style="min-height: 600px">
                                <div class="box-body table-responsive no-padding">
                                    <table class="table table-bordered ">
                                        <thead>
                                        <tr class="info">
                                            <th class="text-center text-muted" style="width: 35px">#</th>
                                            <th class="text-center text-muted">文件类型</th>
                                            <th class="text-center text-muted">文件名</th>
                                            <th class="text-center text-muted">文件下载</th>
                                        </tr>
                                        </thead>
                                        <tbody id="upkeep_file_list">


                                        </tbody>
                                    </table>
                                </div>
                            </div>

                            <!-- 备件信息 -->
                            <div class="tab-pane table-responsive" id="part" style="min-height: 600px">
                                <table class="table table-bordered ">
                                    <thead>
                                    <tr class='info'>
                                        <th class="text-center text-muted">说明</th>
                                        <th class="text-center text-muted">名称(新)</th>
                                        <th class="text-center text-muted">品牌(新)</th>
                                        <th class="text-center text-muted">型号(新)</th>
                                        <th class="text-center text-muted">序列号(新)</th>
                                        <th class="text-center text-muted">价格(新)</th>
                                        <th class="text-center text-muted">名称(旧)</th>
                                        <th class="text-center text-muted">品牌(旧)</th>
                                        <th class="text-center text-muted">型号(旧)</th>
                                        <th class="text-center text-muted">序列号(旧)</th>
                                        <th class="text-center text-muted">价格(旧)</th>
                                        <th class="text-center text-muted">旧备件图片</th>
                                        <th class="text-center text-muted">新备件图片</th>
                                    </tr>
                                    </thead>
                                    <tbody id="upkeep_part_List">
                                    </tbody>
                                </table>
                            </div>

                            <div class="tab-pane table-responsive" id="score" style="min-height: 600px">
                                <table class="table table-bordered">
                                    <thead>
                                        <tr class="info">
                                            <th>服务</th>
                                            <th>评分</th>
                                        </tr>
                                    </thead>
                                    <tbody id="scoreTable">
                                        <tr>
                                            <td class="text-center" colspan="2">暂无评分信息</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </li>
                    </div>
                </div>
            </div>
            <!-- /.col -->
        </section>
    </div>

    <div id="showFileDiv" style="display: none;">
        <div class="box-body">
            <div class="col-md-12" id="oldFileDiv">
                <label  class="col-sm-1 control-label text-muted">旧备件图片</label><div class="col-md-9" id="oldFileImgDiv"></div>
            </div>

            <div class="col-md-12"  id="newFileDiv">
                <label  class="col-sm-1 control-label text-muted">新备件图片</label><div class="col-md-9" id="newFileImgDiv"></div>
            </div>
        </div>

        <div class="box-footer">
                 <span class="pull-right">
                    <button data-iziModal-close class="btn btn-default" style="margin-right: 5px">关闭</button>
                </span>
        </div>
    </div>


    <div id="list-model" style="display: none;">
        <div class="box-body">
            <table id="clickRepairCount-table" class="max-td table table-bordered table-hover">
                <thead>
                <tr class="text-info">
                    <td>序号</td>
                    <td>详情</td>
                    <td>设备名称</td>
                    <td>医院</td>
                    <td>故障时间</td>
                    <td>保养人</td>
                </tr>
                </thead>
                <tbody>
                <td>1</td>
                <td><button type="button" class="btn btn-primary btn-xs" data-original-title="详情"><i class="fa fa-file-text-o"></i></button></td>
                <td>新增设备1</td>
                <td>红房子</td>
                <td>2018-1-1</td>
                <td>刘晓</td>
                </tbody>
            </table>
            <table id="clickUpkeepCount-table" class="max-td table table-bordered table-hover">
                <thead>
                <tr class="text-info">
                    <td>序号</td>
                    <td>详情</td>
                    <td>设备名称</td>
                    <td>医院</td>
                    <td>保养时间</td>
                </tr>
                </thead>
                <tbody>
                <td>1</td>
                <td><button type="button" class="btn btn-primary btn-xs" data-original-title="详情"><i class="fa fa-file-text-o"></i></button></td>
                <td>新增设备1</td>
                <td>红房子</td>
                <td>2017-11-3</td>
                </tbody>
            </table>
            <table id="clickUpkeepPlanCount-table" class="max-td table table-bordered table-hover">
                <thead>
                <tr class="text-info">
                    <td>序号</td>
                    <td>设备名称</td>
                    <td>设备序列号</td>
                    <td>设备型号</td>
                    <td>计划保养时间</td>
                </tr>
                </thead>
                <tbody>
                <td>1</td>
                <td>新增设备1</td>
                <td>SN1001</td>
                <td>MV2911</td>
                <td>2017-11-1</td>
                </tbody>
            </table>
        </div>
        <div class="box-footer">
            <span class="pull-right">
                <button data-iziModal-close class="btn btn-default" style="margin-right: 5px">关闭</button>
            </span>
        </div>
    </div>


    <div id="file_show_modal"></div>
    <footer class="main-footer">
        <div class="pull-right hidden-xs">
            <b>Version</b> 1.0.0
        </div>
        <strong>Copyright &copy; 2019 <a href="http://almsaeedstudio.com">Topmed</a>.</strong> All rights reserved.
    </footer>
    <jsp:include page="../menuRight.jsp"></jsp:include>
    <!-- ./wrapper -->

    <!-- ./wrapper -->
    <script src="<%=basePath%>/plugins/jQuery/jquery-2.2.3.min.js"></script>
    <script src="<%=basePath%>/bootstrap/js/bootstrap.min.js"></script>
    <script src="<%=basePath%>/plugins/slimScroll/jquery.slimscroll.min.js"></script>
    <script src="<%=basePath%>/plugins/fastclick/fastclick.js"></script>
    <script src="<%=basePath%>/dist/js/app.min.js"></script>
    <script src="<%=basePath%>/dist/js/demo.js"></script>
    <script src="<%=basePath%>/bootstrapvalidator/js/bootstrapValidator.min.js"></script>
    <script src="<%=basePath%>/toastr/toastr.js"></script>
    <script src="<%=basePath%>/pagination/js/jquery.pagination.min.js"></script>
    <script src="<%=basePath%>/js/overallSituation.js"></script>
    <script src="<%=basePath%>/fileupload/fileinput.min.js"></script>
    <script src="<%=basePath%>/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script src="<%=basePath%>/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <script src="<%=basePath%>/plugins/select2/select2.min.js"></script>
    <script src="<%=basePath%>/plugins/select2/i18n/zh-CN.js"></script>
    <script src="<%=basePath%>/plugins/iCheck/icheck.min.js"></script>
    <script src="<%=basePath%>/plugins/iziModal/js/iziModal.min.js"></script>
    <script src="<%=basePath%>/plugins/flavr/flavr.min.js"></script>
    <script src="<%=basePath%>/plugins/bootstrap-treeview/js/bootstrap-treeview.js"></script>
    <script src="<%=basePath%>/echarts/echarts.min.js"></script>
    <script src="<%=basePath%>/plugins/viewer/viewer.min.js"></script>
    <script src="<%=basePath%>/js/map.js"></script>
    <script src="<%=basePath%>/js/upkeep/upkeep-info.js"></script>

</body>
</html>
